package com.example.testdemo.db;

import com.example.testdemo.mapper.TestDao;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *
 * </p>
 *
 * @author 永健
 * @since 2020-03-27 17:50
 */
public class DaoFactory<T extends BaseDao> {
    private final static Map<Class<?>, BaseDao> DAO = new HashMap<>();

    static {
        try {
            DAO.put(TestDao.class, null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static <T> T getDao(Class<?> aClass) {
        return (T) DAO.get(aClass);
    }


}
